#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n;
	while(~scanf("%lld", &n))
	{
		long long s1, s2;
//		cin>>s1>>s2;
		scanf("%lld%lld", &s1, &s2);
		
		vector<long long> a(n);
		long long sum = 0;
		
		for(long long i = 1;i <= n;i++)
		{
//			cin>>a[i-1];
			scanf("%lld", &a[i-1]);
			sum += a[i-1];
		}
		
		if(sum < s1+s2)
		{
//			cout<<n<<endl;
			printf("%lld\n", n);
			continue;
		}
		
		sum = 0;
		long long l = 0, r = 0;
		long long ans = 0x3f3f3f3f;
		
		while(r < n)
		{
			sum += a[r++];
			
			while(sum >= s1+s2 && l <= r)
			{
				ans = min(r-l, ans);
				sum -= a[l++];
			}
		}
//		cout<<n-ans<<endl;
		printf("%lld\n", n-ans);
	}
	return 0;
}

